
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/yb_chinese_text/yb_chinese_text.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBMineModule/YBSetPage/YBPingBiManagerSubPage.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBModule/YBMineModule/YBSetPage/YBSettingProvider/YBSettingProvider.dart';

class YBPinBiManagerPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(
          title: Text(YBChineseText.mineQuanCengPinBiManagerTitle,style: YBTextStyle.TextStyle30313320Medium,),
          elevation: 0,
        ),
        body: ChangeNotifierProvider(
          create:(context) => YBSettingPingBiProvider()..getSettingPingBi("layer"),
          child: Consumer<YBSettingPingBiProvider>(
            builder:(context,settingPingBi,child){

              return SmartRefresher(
                controller:settingPingBi.easyRefresh,
                enablePullDown: true,
                enablePullUp: true,
                onRefresh: () async {
                  settingPingBi.getSettingPingBi("layer");
                },
                child: CustomScrollView(
                  slivers: [
                    SliverList(delegate: SliverChildBuilderDelegate((BuildContext context,int index){
                      return YBPingBiManagerSubPage();
                    },childCount: settingPingBi.settingPingBiList.length),),
                  ],
                ),
              );
            }
          ),
        ),
      ),
    );
  }
}
